<#include "tree.html"/>
<SCRIPT type="text/javascript">
	$(document).ready(function(){
		var ztree = $.fn.zTree.init($(document.getElementById("zTree_adminLIst")), setting, zNodes1);
		ztree.selectNode(ztree.getNodeByParam("id", "reportoperation", null));
	});
	
	function exportlog(){
		$("#logform").attr("action","/${orgi}/manage/log/log/exprotReportCSV.html");
		$("#logform").submit();
	}
	
	function submitSearchForm(action){
		$("#logform").attr("action","/${orgi}/manage/log/reportoperation.html");
		$("#beginNum").val($("#beginNumShow").val());
		$("#endNum").val($("#endNumShow").val());
	//	$("#username").val($("#show_username").val());
		$("#action").val(action);
		$("#logform").submit();
	} 
</SCRIPT>

<div class="rs_layout_top breadCrumbWrap">
	<div class="breadCrumbStart">您当前的位置是在：</div>
	<ul class="breadCrumb">
		<li class="bc_ithems"><a href="/${orgi}/manage/index.html">操作日志</a></li>
	</ul>
	<form id="logform" action="" method="post" data-toggle="form">
	<ul class="controlButtons" style="margin-right: 30px;">
		
		<li class="searchhbox" style="width:120px;padding:0px;">
		操作用户：<input name="operationuser" id="operationuser" value="${operationuser!''}" style="margin-top: 4px;border: 1px solid #cccccc;height: 14px;padding: 4px; width: 50px"  type="text"> 
		</li>
		<li class="searchhbox" style="width:120px;padding:0px;">
		请求类型：<input name="operationtype" id="operationtype" value="${operationtype!''}" style="margin-top: 4px;border: 1px solid #cccccc;height: 14px;padding: 4px; width: 50px"  type="text"> 
		</li>
		<li class="searchhbox" style="width:110px;padding:0px;">
		操作用时：<input class="number" name="usedtime" id="usetime" value="${usedtime!''}" style="margin-top: 4px;border: 1px solid #cccccc;height: 14px;padding: 4px; width: 40px"  type="text"> 
		</li>
		<li class="searchhbox" style="width:100px;padding:0px;">
		关键字：<input name="searchkey" id="usetime" value="${searchkey!''}" style="margin-top: 4px;border: 1px solid #cccccc;height: 14px;padding: 4px; width:40px"  type="text"> 
		</li>
		<li class="searchhbox" style="width:250px;padding:0px;">
		开始时间：<input id="beginTime" style="margin-top: 4px;border: 1px solid #cccccc;height: 14px;padding: 4px;"  class="Wdate" type="text" onfocus="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate:'#F{$dp.$D(\'endTime\')}'})"  id="beginTime" name="beginTime" style="margin-top: 5px;width:125px;" value="${beginTime!''}"> 
		</li>
		<li class="searchhbox" style="width:250px;padding:0px;">
		结束时间：<input id="endTime" style="margin-top: 4px;border: 1px solid #cccccc;height: 14px;padding: 4px;" class="Wdate" type="text" onfocus="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'beginTime\')}'})"  id="endTime" name="endTime" style="margin-top: 5px;width:145px;" value="${endTime!''}"> 
		</li>
		<li class="searchhbox" style="padding-top:3px;width: 90px;">
		<input style="padding-top:5px;margin-right: 5px;"  type="button" onclick="submitSearchForm('current')"  class="subButtonStyle" value="查询"> 
		<input style="padding-top:5px"  type="button" onclick="exportlog()"  class="subButtonStyle" value="导出">
		 
		</li>
		
		
	</ul>
	<input type="hidden" id="beginNum" name="beginNum" value="">
	<input type="hidden" id="endNum" name="endNum" value="">
	<input type="hidden" id="action" name="action" value="current">
	</form>
</div>
<div class="rs_layout_left" resizable="true" style="width:230px;">
	<div class="lftTreeWrap">
		<div class="ztree" id="zTree_adminLIst"></div>
	</div>
</div>
<!--<div class="rs_layout_right" style="width:300px;"></div>-->
<div class="rs_layout_center">
	<div class="rs_layout">
		<div class="rs_layout_center">
			<div class="tableScrollWrap">
			     <input type="hidden" id="beginNum" name="beginNum" value="">
				 <input type="hidden" id="endNum" name="endNum" value="">
				 <input type="hidden" id="action" name="action" value="current">
				 <table class="table_style_1">
					<thead>
						<tr>
							<th class="minSize"></th>
							<th><i class="verMidWrap">请求URL</i></th>
							<th><i class="verMidWrap">请求类型</i></th>
							<th class="minSize"><i class="verMidWrap">请求时间</i></th>
							<th class="minSize"><i class="verMidWrap">客户端地址</i></th>
							<th class="minSize"><i class="verMidWrap">操作用户</i></th>
							<th class="minSize"><i class="verMidWrap">执行状态</i></th>
							<th><i class="verMidWrap">执行时间</i></th>
							
						</tr>
					</thead>
					<tbody>
						<#if loglist??>
						<#list loglist as log>
						<tr>
							<td class="tdIcons"><i class="icons_tablelist icons_tablelist_request" title="系统"></i></td>
							<td>${log.reportdic!log.dataname!''}</td>
							<td>${log.name!''}</td>
							<td class="minSize">${log.createdate?string('yyyy-MM-dd HH:mm:ss')}</td>
							<td class="minSize">${log.ip!''}</td>
							<td class="minSize"><#if log.userid??><a id="updateUsers" data-width="565" title="修改用户" href="/${orgi}/manage/account/updateuser/${log.userid!''}.html?url=/rivues/manage/log/reportoperation.html" data-toggle="ajax">${log.username!""}（${log.usermail!''}）</a><#elseif log.username??>${log.username!""}<#else>未知用户</#if></td>
							<td class="minSize" style="text-align:center;"><#if log.error == "true"><i class="icons_tablelist icons_tablelist_error" title="执行失败"></i><#else><i class="icons_tablelist icons_tablelist_succes" title="执行成功"></i></#if></td>
							<td class="minSize"><pre>${log.querytime/1000.0}秒</pre></td>
						</tr>
						</#list>
						</#if>
					</tbody>
				</table>
			</div>
		</div>
	</div>
</div>
<div class="rs_layout_bottom toolBar_bottom" style="overflow: hidden">
<div class="papers_1" style="float:left;line-height:18px;margin:0 10px 0 500px;">
				<span ><label style="font-size: 13px;">条目&nbsp;&nbsp;&nbsp;&nbsp;</label><input type="text" style="width: 30px;height: 10px;" id="beginNumShow" value="${beginNum!'1'}"/><label style="font-size: 13px;">-</label><input style="width: 30px;height: 10px;" type="text" id="endNumShow" value="${endNum!'20'}"/></span>
				<img class="pageElems" onclick="submitSearchForm('current');" title="查询" alt="查询" src="/assets/images/action_go.gif"/>
				<img class="pageElems" onclick="submitSearchForm('first');" title="首页" alt="首页" src="/assets/images/go-first-view.png"/>
				<img class="pageElems" onclick="submitSearchForm('last');" title="上一页" alt="上一页" src="/assets/images/go-previous-view.png"/>			
				<img class="pageElems" onclick="submitSearchForm('next');" title="下一页" alt="下一页" src="/assets/images/go-next-view.png"/>
				<img class="pageElems" onclick="submitSearchForm('final');" title="尾页" alt="尾页" src="/assets/images/go-last-view.png"/>
</div>
</div>